<style type="text/css">
<!--
body,td,th {
	color: #FFF;
}
body {
	background-color: #000;
}
-->
</style>
<?php

include('class/clases.class.php');
$funciones = new clase1();
include('top.php');




if(!isset($_REQUEST['dni'])){
	print_form();
}else{

$dni=$_REQUEST['dni'];
$o_pass=$_REQUEST['pass_actual'];
$n_pass=$_REQUEST['pass_nuev'];
$n2_pass=$_REQUEST['re_pass_nuev'];
if ($funciones->cambia_clave($dni, $o_pass, $n_pass, $n2_pass)){
	
//echo "se cambio la clave";
//echo "<meta http-equiv='Refresh' content='0;url=index.php?msg=se cambio la clave.' />";

	}

}// else


function print_form(){
?>


<table width="303" border="1"   bordercolordark="#FF3300" bordercolorlight="#FF3300" align="center" bordercolor="#FF3300">
  <form name="form_chng_clave" action="./chng_clave.php" method="post">
  <tr>
    <td  align="center" ><img src="img/logo.jpg" width="389" height="83" alt="Sistema de tareaje de ACOMPE S.A." /></td>
  </tr>
  <tr>
    <td bordercolor="#FF3300" align="center"><input name="dni"   onClick="this.value=''" type="text"   value="Coloque aqui su DNI..."  size="40px" class="pintadas"  /></td>
  </tr>
  <tr>
    <td bordercolor="#FF3300" align="center"><input name="pass_actual" onClick="form_chng_clave.pass_actual.value='', form_chng_clave.pass_actual.type='password'" onFocus="form_chng_clave.pass_actual.type='password', form_chng_clave.pass_actual.value=''" type="text"   value="Coloque su clave actual..."  size="40px" class="pintadas"  /></td>
  </tr>
  <tr>
    <td bordercolor="#FF3300" align="center"><input name="pass_nuev" type="text"  onClick="form_chng_clave.pass_nuev.value='', form_chng_clave.pass_nuev.type='password'" onFocus="form_chng_clave.pass_nuev.type='password', form_chng_clave.pass_nuev.value=''"  value="Coloque su nueva clave..."  size="40px" class="pintadas"  /></td>
  </tr>
  <tr>
    <td bordercolor="#FF3300" align="center"><input name="re_pass_nuev" type="text"  onClick="form_chng_clave.re_pass_nuev.value='', form_chng_clave.re_pass_nuev.type='password'" onFocus="form_chng_clave.re_pass_nuev.type='password',form_chng_clave.re_pass_nuev.value=''"  value="Coloque nuevamente su nueva clave..."  size="40px" class="pintadas"  /></td>
    </tr>
  <tr>
    <td align="center"  bordercolor="#FF3300" class="add2"><input type="submit" name="submit" class="pintadas" value="Cambiar clave!!"  /></td><!--rec_clave.php-->
    </tr>
  </form>
</table>

<?php
}//function print form
include('down.php');

?>